#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool isPalindrome(string s) {
        string s1;
        for (auto& e : s)
        {
            if (isalnum(e))
            {
                if (isupper(e))
                {
                    s1 += e + 32;
                }
                else
                {
                    s1 += e;
                }
            }
        }

        string s2(s1);
        reverse(s2.begin(), s2.end());
        cout << s1.c_str() << " " << s2.c_str() << endl;

        return s2 == s1;
    }
};